{% include 'check_logstate.html' %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static '/css/movie.css' %}"/>
{% csrf_token %}
<div id="movie_manage"></div>
<div id="movie_manage_tool" style="padding:5px;">
    {% csrf_token %}
    <div style="margin-bottom:5px;">
        <a href="#" class="easyui-linkbutton" iconCls="icon-edit-new" plain="true"
           onclick="movie_manage_tool.edit();">修改</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-delete-new" plain="true"
           onclick="movie_manage_tool.remove();">删除</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-reload" plain="true"
           onclick="movie_manage_tool.reload();">刷新</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-redo" plain="true"
           onclick="movie_manage_tool.redo();">取消选择</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-edit-new" plain="true"
           onclick="movie_manage_tool.rating();">评分</a>
        <form enctype="multipart/form-data" action="/readfile" method="post">
            {% csrf_token %}
            <input type="file" name="myfile"/>
            <input type="submit" value="批量导入"/>
        </form>
    </div>
    <div style="padding:0 0 0 7px;color:#333;">
        <form id="movieQueryForm" method="get">
            影片名称：<input type="text" class="textbox" id="title" name="title" style="width:110px"/>
            影片体裁：<input type="text" class="textbox" id="genres" name="genres" style="width:110px"/>
            影片上映年份：<input type="text" class="textbox" id="movieYear" name="movieYear" style="width: auto"/>
            <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="movie_manage_tool.search();">查询</a>
        </form>
    </div>
</div>

<div id="movieAddDiv">
    <form id="movieAddForm" enctype="multipart/form-data" method="post">
        {% csrf_token %}
        <div>
            <span hidden class="label">影片id:</span>
            <span hidden class="inputControl">
				<input hidden class="textbox" type="text" id="movie_movieId" name="movie.movieId" style="width:200px"/>
			</span>
        </div>
        <div>
            <span class="label">影片名称:</span>
            <span class="inputControl">
				<input class="textbox" type="text" id="movie_title" name="movie.title" style="width:200px"/>
			</span>
        </div>
        <div>
            <span class="label">影片体裁:</span>
            <span class="inputControl">
                <select id="movie_genres" name="movie.genres" style="width:200px;height:25px;">
                    {% for moviegenre in movieGenres %}
                        <option value="{{ moviegenre.MovieGenreName }}">{{ moviegenre.MovieGenreName }}</option>
                    {% endfor %}
                </select>
            </span>
        </div>
        <div>
            <span class="label">电影简介:</span>
            <span class="inputControl">
				<input class="textbox" type="text" id="movie_movieDesc" name="movie.movieDesc" style="width:80px"/>
			</span>
        </div>
        <div>
            <span class="label">上映年份:</span>
            <span class="inputControl">
				<input class="textbox" type="text" id="movie_movieYear" name="movie.movieYear" style="width:80px"/>
			</span>
        </div>
        <div class="operation">
            <a id="movieAddButton" class="easyui-linkbutton">添加</a>
            <a id="movieClearButton" class="easyui-linkbutton">重填</a>
        </div>
    </form>
</div>

<div id="movieRatingDiv">
    <form id="movieRatingForm" enctype="multipart/form-data" method="post">
        {% csrf_token %}
        <div>
            <span hidden class="label">影片id:</span>
            <span hidden class="inputControl">
				<input hidden class="textbox" type="text" id="rating_movieId" name="movie.movieId" style="width:200px"/>
			</span>
        </div>
        <div>
            <span class="label">影片名称:</span>
            <span class="inputControl">
				<input class="textbox" type="text" id="rating_title" name="movie.title" style="width:200px"/>
			</span>
        </div>
        <div>
            <span class="label">评分:</span>
            <span class="inputControl">
				<input class="textbox" type="text" id="rating_rating" name="movie.rating" style="width:200px"/>
			</span>
        </div>
        <div class="operation">
            <a id="movieAddButton" class="easyui-linkbutton">添加</a>
            <a id="movieClearButton" class="easyui-linkbutton">重填</a>
        </div>
    </form>
</div>
<script type="text/javascript" src="{% static 'js/Movie/movie_manage.js' %}"></script>

